<extend name="Public:base" />
<block name="content">

    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">Tables</h1>
        </div>
        <!-- /.col-lg-12 --> </div>
    <!-- /.row -->
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <button type="button" class="btn btn-primary">新增用户</button>
                </div>
                <!-- /.panel-heading -->
                <div class="table-responsive">
                <div class="panel-body">
                    <div class="dataTable_wrapper">
                    
                        <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                            <thead>
                                <tr>
                                    <th>UID</th>
                                    <th>姓名</th>
                                    <th>身份证</th>
                                    <th>电话</th>
                                    <th>备注</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <foreach name="user_list" item="ul">
                <tr>
                    <td>{$ul.id}</td>
                    <td>{$ul.user_name}</td>
                    <td>{$ul.ip}</td>
                    <td>{$ul.create_time|date="Y-m-d H:i:s",###}</td>
                    <td>{$ul.last_time|date="Y-m-d H:i:s",###}</td>
                    <td>
                        <a class="btn btn-sm btn-default" href="{:U('User/edit',array('id'=>$ul['id']))}" role="button">编辑</a>
                        <a class="btn btn-sm btn-default" href="{:U('User/delete',array('id'=>$ul['id']))}" role="button">删除</a>
                    </td>
                </tr>
            </foreach>
                                
                                
                            </tbody>
                        </table>
                    </div>
                    </div>
                    <!-- /.table-responsive --> </div>
                <!-- /.panel-body --> </div>
            <!-- /.panel --> </div>
        <!-- /.col-lg-12 --> </div>
    <!-- /.row -->
</block>
<block name="extend-css">
    <!-- DataTables CSS -->
    <link href="__STATIC__/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" rel="stylesheet">

    <!-- DataTables Responsive CSS -->
    <link href="__STATIC__/bower_components/datatables-responsive/css/dataTables.responsive.css" rel="stylesheet"></block>
<block name="extend-js">
    <script src="__STATIC__/bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
    <script src="__STATIC__/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js"></script>

    <!-- Page-Level Demo Scripts - Tables - Use for reference -->
    <script>
    $(document).ready(function() {
        $('#dataTables-example').DataTable({
                responsive: true
        });
    });
    </script>
</block>